home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / Genetic_Optimization / kernel adatron full.nsm < prev    next >
Encoding:
Text File  |  2002-03-08  |  4.4 KB  |  113 lines

  1. //
  2. // This macro creates the standard linear regression breadboard
  3. //
  4. subtitleTextBox. setText ("")
  5. mainTextBox. setText ("")
  6. //
  7. //  Record here if necessary
  8. //
  9. activeBreadboard. deleteObject ( "tanhAxon" )
  10. activeBreadboard. deleteObject ( "fullSynapse1" )
  11. activeBreadboard. maximize (  )
  12. activeBreadboard. select ( "fullSynapse" , FALSE )
  13.  
  14. activeBreadboard. deleteObject ( "inputAxonBackprop" )
  15. activeBreadboard. replaceWith ( "hidden1Synapse" , "StandardFull" )
  16. weightViewer. setActiveAccessPoint ( "Weights" )
  17. activeBreadboard. replaceWith ( "outputAxon" , "GaussianAxon" )
  18. dLLPostprocessor. setActiveAccessPoint ( "Pre-Activity" )
  19. activeBreadboard. replaceWith ( "linearTanhAxon" , "Axon" )
  20. linearTanhAxon. setName ( "axon" )
  21. activeBreadboard. replaceWith ( "criterion" , "L1Criterion" )
  22. desiredFile. setActiveAccessPoint ( "Desired Signal" )
  23.  
  24. fullSynapse. connectTo ( "axon" )
  25. axon. moveTo ( 400 , 192 )
  26. criterion. moveTo ( 529 , 204 )
  27.  
  28.  
  29. activeBreadboard. deleteObject ( "linearTanhAxonBackpropGradient" )
  30. activeBreadboard. setAnimatePoint ( 555,301 )
  31. activeBreadboard. stampAndMove ( "ThresholdAxon" , "thresholdAxon" )
  32. axon. connectTo ( "thresholdAxon" )
  33. dLLPostprocessor. moveOn ( "thresholdAxon" )
  34. dLLPostprocessor. setActiveAccessPoint ( "Activity" )
  35. outputAxon. setRows ( 92 )
  36.  
  37. activeBreadboard. maximize (  )
  38. thresholdAxon. moveTo ( 472 , 306 )
  39. activeBreadboard. setAnimatePoint ( 580 ,306 )
  40. activeBreadboard. stampAndMove ( "L2Criterion" , "criterion1" )
  41. thresholdAxon. connectTo ( "criterion1" )
  42. costViewer. moveOn ( "criterion1" )
  43. costViewer. setActiveAccessPoint ( "Average Cost" )
  44. activeBreadboard. maximize (  )
  45. weightViewer. closeEngineWindow (  )
  46. activeBreadboard. maximize (  )
  47. activeBreadboard. stampOnAndMove ( "MatrixViewer" , "fullSynapse" )
  48. matrixViewer. setActiveAccessPoint ( "Weights" )
  49. activeBreadboard. select ( "matrixViewer" , FALSE )
  50. matrixViewer. setFixWindowTitle ( TRUE )
  51. matrixViewer. setWindowTitle ( "Alpha Values" )
  52.  
  53. // DLLs
  54.  
  55. dllPath=macro.pathFromMacro(".\adatron.dll")
  56. hidden1Synapse. setDLLName ( "adatron" , dllPath )
  57. hidden1Synapse. activateDLL ( TRUE )
  58. fullSynapseBackprop. setDLLName ( "adatron_dp" ,dllPath )
  59. fullSynapseBackprop. activateDLL ( TRUE )
  60. fullSynapse. setDLLName ( "adatron" , dllPath)
  61. fullSynapse. activateDLL ( TRUE )
  62. criterion. setDLLName ( "adatron" , dllPath )
  63. criterion. activateDLL ( TRUE )
  64. activeBreadboard. deleteObject ( "fullSynapseBackpropGradient" )
  65. activeBreadboard. deleteObject ( "outputAxonBackpropGradient" )
  66.  
  67. activeBreadboard. stampOnAndMove ( "Step" , "fullSynapseBackprop" )
  68. fullSynapseBackpropGradient. setDLLName ( "adatron" , dllPath )
  69. fullSynapseBackpropGradient. activateDLL ( TRUE )
  70. activeBreadboard. maximize (  )
  71. activeBreadboard. stampOnAndMove ( "File" , "criterion1" )
  72. file. setActiveAccessPoint ( "Desired Signal" )
  73. activeBreadboard. select ( "file" , FALSE )
  74. filePath=macro.pathFromMacro(".\spiral_target.ibe")
  75. file. addFile (filePath , FALSE )
  76. activeBreadboard. maximize (  )
  77. activeBreadboard. maximize (  )
  78. activeBreadboard. select ( "file" , FALSE )
  79. file. setNormalize ( TRUE )
  80. file. setLowerBound ( -1.000000 )
  81. activeBreadboard. select ( "fullSynapse" , FALSE )
  82. fullSynapse. setWeightVariance ( 0.000000 )
  83. fullSynapse. setWeightMean ( 0.100000 )
  84. outputAxon. setWeightVariance ( 0.000000 )
  85.  
  86. activeBreadboard. select ( "fullSynapseBackpropGradient" , FALSE )
  87. fullSynapseBackpropGradient. setStepSize (0.100000 )
  88. control. setEpochCounter ( 0 )
  89. activeBreadboard. select ( NULL, FALSE )
  90.  
  91. activeBreadboard. stampOnAndMove ( "ThresholdTransmitter" , "control" )
  92. thresholdTransmitter. setBeta ( 1.000000 )
  93. thresholdTransmitter. setLessThan ( 1 )
  94. thresholdTransmitter. setThreshold ( 2.000000 )
  95. thresholdTransmitter. toggleConnection ( "outputAxon" , "assignVariance" )
  96. activeBreadboard. stampOnAndMove ( "ArrowEngine" , "outputAxon" )
  97. activeBreadboard. stampOnAndMove ( "ArrowEngine" , "matrixViewer" )
  98.  
  99. controlBackprop. setBatch ( FALSE )
  100. control. setEpochs ( 150 )
  101.  
  102. //
  103. // fill in text
  104. //
  105. TextBoxPath = macro. pathFromMacro("textBox.txt")
  106. NextMacroPath = macro. pathFromMacro ( ".\2 summary.nsm" )
  107. nextButton. setMacroPath ( NextMacroPath )
  108. CancelMacroPath= macro.pathFromMacro("..\minimize.nsm")
  109. cancelButton. setMacroPath ( CancelMacroPath)
  110. SubtitleIndex = subtitleTextBox. setTextFromFile (TextBoxPath, 0)
  111. MainIndex = mainTextBox. setTextFromFile (TextBoxPath, 0)
  112.  
  113.